﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace TrainningWeekend
{
    interface Printer
    {
        void Print(string content);
        
    }

    class MyPrinter : Printer
    {
        public void Print(string content)
        {
            Console.WriteLine("My printer is printing, the content is :");
            Console.WriteLine(content);
        }
    }

    class EpsonPrinter : Printer
    {
        public void Print(string content)
        {
            Console.WriteLine("Epson printer is printing, the content is :");
            Console.WriteLine(content);
        }

    }

    class PrinterManager
    {
        public static Printer GetPrinter(string name)
        {
            if (name == "epson")
            {
                return new EpsonPrinter();
            }
            else
            {
                return new MyPrinter();
            }
        }
    }
}
